﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace CashierSystem.CashierInManager
{
    public partial class SearchCardForm : Form
    {
        public SearchCardForm()
        {
            InitializeComponent();
        }

        private void SearchCardForm_Load(object sender, EventArgs e)
        {
            string startDate = tbStartDate.Text;
            string endDate = tbEndDate.Text;
            string cardType = cbCardType.Text;
            CashierInManager.searchSaleCard(listView1,startDate,endDate,cardType);
        }

        private void dtpStartDate_ValueChanged(object sender, EventArgs e)
        {
            tbStartDate.Text = dtpStartDate.Value.Date.ToString();
        }

        private void dtpEndDate_ValueChanged(object sender, EventArgs e)
        {
            tbEndDate.Text = dtpEndDate.Value.Date.ToString();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            string startDate = tbStartDate.Text;
            string endDate = tbEndDate.Text;
            string cardType = cbCardType.Text;
            CashierInManager.searchSaleCard(listView1,startDate,endDate,cardType);
        }
    }
}